.TH stoker_exec 8 "17 September 2008" "version 0.91" "Stoker Manual"
.SH NAME
stoker (exec) \- remote command execution
.SH SYNOPSIS
.B stoker
[OPTIONS] <machine(s)> exec [options] [arguments]

.B stoker
<\-a | \-\-all> [OPTIONS] exec [options] [arguments]
.SH DESCRIPTION
The stoker(8) exec command executes a shell command on a remote system,
returning its standard output and standard error to the stoker program.
Execution can be sequential or parallel across systems, depending on the
global OPTIONS selected.
These global OPTIONS are documented in the man page for stoker(8) itself.
.SH COMMAND OPTIONS
.TP
.B \-s \-\-script
Treat the first argument as the name of a script on the local machine (where
stoker is being executed), with the rest of the arguments treated as arguments
to the script.
.SH SCRIPT EXECUTION
If the \-s command option is passed to the exec command, the first argument
is treated as the name of a script to be executed.
The path of this script is local to the machine on which the user is running
stoker itself, NOT to the target machine(s).
For correct execution, the top line of the script file \fBMUST\fR be a
"sh-bang" line (#!) that instructs the kernel to run a specific interpreter.
Also, the kernels of the target machines must be compiled with MISC binary
support.
.SH COMMAND INPUT
Files may be re-directed to commands or scripts using the \-i option in Stoker.
See stoker(8) for details.
.SH EXAMPLES
.TP
Execute /bin/hostname on machines host1 and host2:
stoker host1,host2 exec /bin/hostname
.PP
A script (named myscript) to accomplish the same task:

.nf
#!/bin/bash
/bin/hostname
.fi

.TP
This script can be executed as follows:
stoker host1,host2 exec -s myscript
.SH EXIT STATUS
Stoker returns a zero exit status if all commands it executes are completed
successfully.
Otherwise, a non-zero exit code will be returned.
The exact return code depends upon the return code of the malfunctioning
sub-process.
.SH SEE ALSO
stoker_do(8)
.SH AUTHOR
Mike Murphy (mamurph@cs.clemson.edu)
.SH DISCLAIMER
This material is based upon work supported under a National Science
Foundation Graduate Research Fellowship.
Any opinions, findings, conclusions or recommendations expressed in this
publication are those of the author(s) and do not necessarily reflect the
views of the National Science Foundation.
